package com.cyy.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.http.HttpStatus;

import java.io.Serial;


@Data
@EqualsAndHashCode(callSuper = true)
public class ProcessException extends RuntimeException {

    @Serial
    private static final long serialVersionUID = 3655050728585279326L;

    private int code = HttpStatus.INTERNAL_SERVER_ERROR.value();

    public ProcessException() {

    }

    public ProcessException(String msg) {
        super(msg);
    }

    public ProcessException(int code, String msg) {
        super(msg);
        this.code = code;
    }

    public ProcessException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
    }

}
